package util;

public class ObjectIdPropertyPair implements Comparable<ObjectIdPropertyPair>{
		private long property;
		private int oId;
		public ObjectIdPropertyPair(int mId,  long property) {
			super();
			this.property = property;
			this.oId = mId;
		}

		/**
		 * @return the penalty
		 */
		public final long getProperty() {
			return property;
		}
		/**
		 * @param penalty the penalty to set
		 */
		public final void setProperty(long property) {
			this.property = property;
		}
		/**
		 * @return the examId
		 */
		public final int getObjectId() {
			return oId;
		}
		/**
		 * @param examId the examId to set
		 */
		public final void setObjectId(int examId) {
			this.oId = examId;
		}

		@Override
		public int compareTo(ObjectIdPropertyPair other) {
			long t = property-other.getProperty();
			return (t<0)?1:(t==0)?0:-1;
		}
		
		@Override
		public String toString() {
			return "{"+oId+":"+property+"}";
		}
	}
